﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using CashFlow.Db.Entity;
using CashFlow.Web.Def;
using CashFlow.Web.Areas.ShopManage.Models.User.Result;

namespace CashFlow.Web.Areas.ShopManage.Service
{
    public interface IUserService : IService<UserInfoEntity>
    {
        IList<UserInfoModel> QueryShopAllUsers(int shopManagerUserId);

        IList<UserInfoModel2> QueryByWhere(
            int shopManagerUserId
            , string phone
            , string name
            , string invitationCode
            , string reference
            , string referenceInvitationCode
            , int? state);

        bool IsReferenceInvitationCodeInShop(
            int shopManagerUserId
            , int userId
            , string referenceInvitationCode);

        bool ResetPwd(int userId, string pwd);

        bool ResetState(int userId, int state);

        bool ResetShopManagerLevelPercent(int userId, decimal percent);

        bool UpdateUserReference(int userId, string referenceInvitationCode);

        EUpdateUserInfoResult UpdateUserInfo(
            int userId
            , string name
            , string phone);
    }
}
